<!DOCTYPE html>

<!-- 通过 xmlns:th=”http://www.thymeleaf.org“ 命令空间，将静态页面转换为动态的视图，
需要进行动态处理的元素,将使用“th:”前缀。 -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<html>
	<head>
		<meta charset="utf-8">
		<title></title>

		<link rel="stylesheet" href="webjars/bootstrap/3.4.1/css/bootstrap.css">
		<script src="webjars/jquery/3.6.0/jquery.js"></script>
		<script src="webjars/bootstrap/3.4.1/js/bootstrap.js"></script>

		<link rel="stylesheet" href="css/myfavorite.css">

	</head>

	<body>
		<div class="container">
			
			<div class="title">收藏的电子书</div>
			
			
			<!-- 电子书列表区域 -->
			<div class="favorite-list">
				<table class="table table-hover">
				  <tr>
					  <th>书籍名称</th>
					  <th>作者</th>
					  <th>收藏时间</th>
					  <th>操作</th>
				  </tr>

					  	<tr th:each=" item : ${memberInfoList[0]}">
						  <td><a href="javascript:void(0)" th:onclick="novelDetail(toNovelDetail(novelId=${item.novel.novelId }) )" > [[ ${item.novel.title } ]]  </a></td>
						  <td> [[${item.novel.authorName }]] </td>
						  <td> [[ ${item.favoritetime } ]] </td>
						  <td><a href="javascript:void(0)" th:onclick="delFav(delFavorites(favoriteId=${item.favoriteId }))">删除</a></td>
					  </tr>


				</table>
			</div>
			

		</div>
	</body>
</html>


<script type="text/javascript">
    function  novelDetail(path) {
    	
    	top.location.href=path;
	}
    
function  delFav(path){
    	
    	top.location.href=path;
	}
</script>